Page({
  /**
   * 页面的初始数据
   */
  data: {
    //标签列表
    navList: [
      { title: '分类', index: 0 },
      { title: '名句', index: 1 },
      { title: '作者', index: 2 },
    ],
    // 被选中的下标
    chosed: 0,
    // 内容主体数据
    contentList: [
     
    ],
    contentList1: [{}],
    contentList2: [{}],
  },
 
  gotoFams() {
    wx.navigateTo({
      url: '../fams/fams',
    })
  },

  gotoAuthor() {
    wx.navigateTo({
      url: '../author/author',
    })
  },
  
  goSearch(){
    wx.navigateTo({
      url: '../search/search',
    })
  },


  //监听事件
  //导航栏切换事件
  navChange(e) {
    //todo:切换样式  更改index,以便切换主体内容
    //通过更给chosed来更改样式和数据源
    let index = e.currentTarget.dataset.index;
    this.setData({
      chosed: index,
    })
  },

  gotoDes1() {
    wx.navigateTo({
      url: '../total/des1/des1',
    })
  },
  gotoDes2() {
    wx.navigateTo({
      url: '../total/des2/des2',
    })
  },
  gotoDes3() {
    wx.navigateTo({
      url: '../total/des3/des3',
    })
  },
  gotoDes4() {
    wx.navigateTo({
      url: '../total/des4/des4',
    })
  },
  gotoDes5() {
    wx.navigateTo({
      url: '../total/des5/des5',
    })
  },
  gotoDes6() {
    wx.navigateTo({
      url: '../total/des6/des6',
    })
  },
  gotoDes7() {
    wx.navigateTo({
      url: '../total/des7/des7',
    })
  },
  gotoDes8() {
    wx.navigateTo({
      url: '../total/des8/des8',
    })
  },
  gotoDes9() {
    wx.navigateTo({
      url: '../total/des9/des9',
    })
  },
   gotoDes10() {
    wx.navigateTo({
      url: '../total/des10/des10',
    })
  },
  gotoDes11() {
    wx.navigateTo({
      url: '../total/des11/des11',
    })
  },
  gotoDes12() {
    wx.navigateTo({
      url: '../total/des12/des12',
    })
  }, 
  gotoBty1() {
    wx.navigateTo({
      url: '../wes/bty1/bty1',
    })
  },
  gotoBty2() {
    wx.navigateTo({
      url: '../wes/bty2/bty2',
    })
  },
  gotoBty3() {
    wx.navigateTo({
      url: '../wes/bty3/bty3',
    })
  },
  gotoBty4() {
    wx.navigateTo({
      url: '../wes/bty4/bty4',
    })
  },
  gotoBty5() {
    wx.navigateTo({
      url: '../wes/bty5/bty5',
    })
  },
  gotoBty6() {
    wx.navigateTo({
      url: '../wes/bty6/bty6',
    })
  },
  gotoBty7() {
    wx.navigateTo({
      url: '../wes/bty7/bty7',
    })
  },
  gotoBty8() {
    wx.navigateTo({
      url: '../wes/bty8/bty8',
    })
  },

  gotoFam1() {
    wx.navigateTo({
      url: '../theme/theme1/theme1',
    })
  },
  gotoFam2() {
    wx.navigateTo({
      url: '../theme/theme2/theme2',
    })
  },
  gotoFam3() {
    wx.navigateTo({
      url: '../theme/theme3/theme3',
    })
  },
  gotoFam4() {
    wx.navigateTo({
      url: '../theme/theme4/theme4',
    })
  },
  gotoFam5() {
    wx.navigateTo({
      url: '../theme/theme5/theme5',
    })
  },
  gotoFam6() {
    wx.navigateTo({
      url: '../theme/theme6/theme6',
    })
  },
  gotoFam7() {
    wx.navigateTo({
      url: '../theme/theme7/theme7',
    })
  },
  gotoFam8() {
    wx.navigateTo({
      url: '../theme/theme8/theme8',
    })
  },
  
 
  // onLoad() {
  //   //将拿到的数据进行处理，分类
  //   var contentList01 = this.data.contentList.filter(currentValue => { return currentValue.status == 0 })
  //   var contentList02 = this.data.contentList.filter(currentValue => { return currentValue.status == 1 })
  //   this.setData({
  //     contentList1: contentList01,
  //     contentList2: contentList02,
  //   })
  // }
 
})